<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Orden de Compra</title>
<style type="text/css">
<!--
.style1 {
	color: #0000FF;
	font-weight: bold;
	font-size: 24px;
}
.Estilo1 {color: #FFFFFF}
.Estilo2 {font-size: 24px; font-weight: bold;}
body,td,th {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 14px;
	color: #000000;
}
body {
	background-color: #FFFFFF;
}
a {
	font-family: Courier New, Courier, mono;
	font-size: 14px;
	color: #FFFFFF;
}
a:visited {
	color: #000000;
}
a:hover {
	color: #000000;
}
a:active {
	color: #999999;
}
-->
</style></head>

<body>
<form action="modificar_compra4.php" method="post" name="form1" target="_self" class="Estilo1">
  <table width="93%" border="1" bordercolor="#000000">
    <tr>
      <td colspan="4"><div align="center"><img src="logo.JPG" width="207" height="102"></div></td>
    </tr>
    <tr>
      <td width="16%"><div align="center"><strong>Orden de Compra Numero:</strong></div></td>
      <td colspan="3"><? echo "<input type=hidden name='cod' value='$cod'>";?><? echo "<input type=hidden name='codord' value='$codcom'>$codcom";?></td>
    </tr>
    <tr>
      <td><div align="center"><strong>Fecha:</strong></div></td>
      <td colspan="3"><? echo "<input type=hidden name='fec' value='$fec'>$fec";?></td>
    </tr>
    <tr>
      <td height="36" colspan="4"><span class="style2">Mediante la Presente se Emite Orden de <? echo "<input type=hidden name='tipo' value='$tipo'>$tipo";?> Interna a la Empresa </span></td>
    </tr>
    <tr>
      <td><div align="center"><strong>Empresa:</strong></div></td>
      <td colspan="3"><? echo "<input type=hidden name='emp' value='$emp'>$emp";?></td>
    </tr>
    <tr>
      <td><div align="center"><strong>Rif:</strong></div></td>
      <td colspan="2"><? echo "<input type=hidden name='rif' value='$rif'>$rif";?></td>
      <td><strong>Fondo N&ordm;:</strong> <? echo "<input type=hidden name='fondo' value='$fondo'>$fondo";?></td>
    </tr>
    <tr>
      <td height="39"><div align="center"><strong>Cantidad</strong></div></td>
      <td width="49%"><div align="center"><strong>Descripci&oacute;n</strong></div></td>
      <td width="16%"><div align="center"><strong>Precio Unitario </strong></div></td>
      <td width="19%"><div align="center"><strong>Total</strong></div></td>
    </tr>
    <tr>
      <td><div align="center">
      <? echo "<input type=hidden name='can1' value='$can1'>$can1";?>      </div></td>
      <td><div align="center">
      <? echo "<input type=hidden name='des1' value='$des1'>$des1";?>-      <? echo "<input type=hidden name='cuenta1' value='$cuenta1'>$cuenta1";?></div></td>
      <td><div align="center">
      <? echo "<input type=hidden name='pu1' value='$pu1'>$pu1";?>      </div></td>
      <td><div align="center">
	    <? $t1= $can1 * $pu1;
		$t1=round($t1,2);
		if ($t1==0)
		$t1="&nbsp;";
		 echo "<input type=hidden name='t1' value= '$t1'>$t1";?>
      </div></td>
    </tr>
    <tr>
      <td><div align="center"> <? echo "<input type=hidden name='can2' value='$can2'>$can2";?> </div></td>
      <td><div align="center"> <? echo "<input type=hidden name='des2' value='$des2'>$des2";?> -<? echo "<input type=hidden name='cuenta2' value='$cuenta2'>$cuenta2";?></div></td>
      <td><div align="center"> <? echo "<input type=hidden name='pu2' value='$pu2'>$pu2";?> </div></td>
      <td><div align="center"> <? $t2= $can2 * $pu2; $t2=round($t2,2); if ($t2==0)
		$t2="&nbsp;"; echo "<input type=hidden name='t2' value='$t2'>$t2";?> </div></td>
    </tr>
    <tr>
      <td><div align="center"> <? echo "<input type=hidden name='can3' value='$can3'>$can3";?> </div></td>
      <td><div align="center"> <? echo "<input type=hidden name='des3' value='$des3'>$des3";?> -<? echo "<input type=hidden name='cuenta3' value='$cuenta3'>$cuenta3";?></div></td>
      <td><div align="center"> <? echo "<input type=hidden name='pu3' value='$pu3'>$pu3";?> </div></td>
      <td><div align="center"> <? $t3= $can3 * $pu3; $t3=round($t3,2);if ($t3==0)
		$t3="&nbsp;"; echo "<input type=hidden name='t3' value='$t3'>$t3";?> </div></td>
    </tr>
    <tr>
      <td><div align="center"> <? echo "<input type=hidden name='can4' value='$can4'>$can4";?> </div></td>
      <td><div align="center"> <? echo "<input type=hidden name='des4' value='$des4'>$des4";?> -<? echo "<input type=hidden name='cuenta4' value='$cuenta4'>$cuenta4";?></div></td>
      <td><div align="center"> <? echo "<input type=hidden name='pu4' value='$pu4'>$pu4";?> </div></td>
      <td><div align="center"> <? $t4= $can4 * $pu4; $t4=round($t4,2);if ($t4==0)
		$t4="&nbsp;"; echo "<input type=hidden name='t4' value='$t4'>$t4";?> </div></td>
    </tr>
    <tr>
      <td><div align="center"> <? echo "<input type=hidden name='can5' value='$can5'>$can5";?> </div></td>
      <td><div align="center"> <? echo "<input type=hidden name='des5' value='$des5'>$des5";?> -<? echo "<input type=hidden name='cuenta5' value='$cuenta5'>$cuenta5";?></div></td>
      <td><div align="center"> <? echo "<input type=hidden name='pu5' value='$pu5'>$pu5";?> </div></td>
      <td><div align="center"> <? $t5= $can5 * $pu5; $t5=round($t5,2); if ($t5==0)
		$t5="&nbsp;"; echo "<input type=hidden name='t5' value='$t5'>$t5";?> </div></td>
    </tr>
    <tr>
      <td><div align="center"> <? echo "<input type=hidden name='can6' value='$can6'>$can6";?> </div></td>
      <td><div align="center"> <? echo "<input type=hidden name='des6' value='$des6'>$des6";?>- <? echo "<input type=hidden name='cuenta6' value='$cuenta6'>$cuenta6";?></div></td>
      <td><div align="center"> <? echo "<input type=hidden name='pu6' value='$pu6'>$pu6";?> </div></td>
      <td><div align="center"> <? $t6= $can6 * $pu6; $t6=round($t6,2); if ($t6==0)
		$t6="&nbsp;"; echo "<input type=hidden name='t6' value='$t6'>$t6";?> </div></td>
    </tr>
    <tr>
      <td><div align="center"> <? echo "<input type=hidden name='can7' value='$can7'>$can7";?> </div></td>
      <td><div align="center"> <? echo "<input type=hidden name='des7' value='$des7'>$des7";?> -<? echo "<input type=hidden name='cuenta7' value='$cuenta7'>$cuenta7";?></div></td>
      <td><div align="center"> <? echo "<input type=hidden name='pu7' value='$pu7'>$pu7";?> </div></td>
      <td><div align="center"> <? $t7= $can7 * $pu7; $t7=round($t7,2); if ($t7==0)
		$t7="&nbsp;"; echo "<input type=hidden name='t7' value='$t7'>$t7";?> </div></td>
    </tr>
    <tr>
      <td><div align="center"> <? echo "<input type=hidden name='can8' value='$can8'>$can8";?> </div></td>
      <td><div align="center"> <? echo "<input type=hidden name='des8' value='$des8'>$des8";?> -<? echo "<input type=hidden name='cuenta8' value='$cuenta8'>$cuenta8";?></div></td>
      <td><div align="center"> <? echo "<input type=hidden name='pu8' value='$pu8'>$pu8";?> </div></td>
      <td><div align="center"> <? $t8= $can8 * $pu8; $t8=round($t8,2);if ($t8==0)
		$t8="&nbsp;"; echo "<input type=hidden name='t8' value='$t8'>$t8";?> </div></td>
    </tr>
    <tr>
      <td><div align="center"> <? echo "<input type=hidden name='can9' value='$can9'>$can9";?> </div></td>
      <td><div align="center"> <? echo "<input type=hidden name='des9' value='$des9'>$des9";?> -<? echo "<input type=hidden name='cuenta9' value='$cuenta9'>$cuenta9";?></div></td>
      <td><div align="center"> <? echo "<input type=hidden name='pu9' value='$pu9'>$pu9";?> </div></td>
      <td><div align="center"> <? $t9= $can9 * $pu9; $t9=round($t9,2); if ($t9==0)
		$t9="&nbsp;"; echo "<input type=hidden name='t9' value='$t9'>$t9";?> </div></td>
    </tr>
    <tr>
      <td><div align="center"> <? echo "<input type=hidden name='can10' value='$can10'>$can10";?> </div></td>
      <td><div align="center"> <? echo "<input type=hidden name='des10' value='$des10'>$des10";?> -<? echo "<input type=hidden name='cuenta10' value='$cuenta10'>$cuenta10";?></div></td>
      <td><div align="center"> <? echo "<input type=hidden name='pu10' value='$pu10'>$pu10";?> </div></td>
      <td><div align="center"> <? $t10= $can10 * $pu10; $t10=round($t10,2); if ($t10==0)
		$t10="&nbsp;"; echo "<input type=hidden name='t10' value='$t10'>$t10";?> </div></td>
    </tr>
    <tr>
      <td><div align="center"> <? echo "<input type=hidden name='can11' value='$can11'>$can11";?> </div></td>
      <td><div align="center"> <? echo "<input type=hidden name='des11' value='$des11'>$des11";?>- <? echo "<input type=hidden name='cuenta11' value='$cuenta11'>$cuenta11";?></div></td>
      <td><div align="center"> <? echo "<input type=hidden name='pu11' value='$pu11'>$pu11";?> </div></td>
      <td><div align="center"> <? $t11= $can11 * $pu11; $t11=round($t11,2); if ($t11==0)
		$t11="&nbsp;"; echo "<input type=hidden name='t11' value='$t11'>$t11";?> </div></td>
    </tr>
    <tr>
      <td><div align="center"> <? echo "<input type=hidden name='can12' value='$can12'>$can12";?> </div></td>
      <td><div align="center"> <? echo "<input type=hidden name='des12' value='$des12'>$des12";?> -<? echo "<input type=hidden name='cuenta12' value='$cuenta12'>$cuenta12";?></div></td>
      <td><div align="center"> <? echo "<input type=hidden name='pu12' value='$pu12'>$pu12";?> </div></td>
      <td><div align="center"> <? $t12= $can12 * $pu12; $t12=round($t12,2); if ($t12==0)
		$t12="&nbsp;"; echo "<input type=hidden name='t12' value='$t12'>$t12";?> </div></td>
    </tr>
    <tr>
      <td><div align="center"> <? echo "<input type=hidden name='can13' value='$can13'>$can13";?> </div></td>
      <td><div align="center"> <? echo "<input type=hidden name='des13' value='$des13'>$des13";?> -<? echo "<input type=hidden name='cuenta13' value='$cuenta13'>$cuenta13";?></div></td>
      <td><div align="center"> <? echo "<input type=hidden name='pu13' value='$pu13'>$pu13";?> </div></td>
      <td><div align="center"> <? $t13= $can13 * $pu13; $t13=round($t13,2); if ($t13==0)
		$t13="&nbsp;"; echo "<input type=hidden name='t13' value='$t13'>$t13";?> </div></td>
    </tr>
    <tr>
      <td><div align="center"> <? echo "<input type=hidden name='can14' value='$can14'>$can14";?> </div></td>
      <td><div align="center"> <? echo "<input type=hidden name='des14' value='$des14'>$des14";?>- <? echo "<input type=hidden name='cuenta14' value='$cuenta14'>$cuenta14";?></div></td>
      <td><div align="center"> <? echo "<input type=hidden name='pu14' value='$pu14'>$pu14";?> </div></td>
      <td><div align="center"> <? $t14= $can14 * $pu14; $t14=round($t14,2); if ($t14==0)
		$t14="&nbsp;"; echo "<input type=hidden name='t14' value='$t14'>$t14";?> </div></td>
    </tr>
    <tr>
      <td><div align="center"> <? echo "<input type=hidden name='can15' value='$can15'>$can15";?> </div></td>
      <td><div align="center"> <? echo "<input type=hidden name='des15' value='$des15'>$des15";?> -<? echo "<input type=hidden name='cuenta15' value='$cuenta15'>$cuenta15";?></div></td>
      <td><div align="center"> <? echo "<input type=hidden name='pu15' value='$pu15'>$pu15";?> </div></td>
      <td><div align="center"> <? $t15= $can15 * $pu15; $t15=round($t15,2);if ($t15==0)
		$t15="&nbsp;"; echo "<input type=hidden name='t15' value='$t15'>$t15";?> </div></td>
    </tr>
    <tr>
      <td colspan="3"><div align="right"><strong>SUB - TOTAL</strong></div></td>
      <td><? $subtotal= $t1 + $t2 + $t3 + $t4 + $t5 + $t6 + $t7 + $t8 + $t9 + $t10 + $t11 + $t12 + $t13 + $t14 + $t15;
	  $subtotal1= round($subtotal,2); echo "<input type=hidden name='subtotal' value='$subtotal1'>$subtotal1";?> 
        Bs. 
        <div align="center"></div>
      <div align="center"></div></td>
    </tr>
    <tr>
      <td colspan="3"><div align="right"><strong>IVA
      <? echo "<input type=hidden name='iva' value='$iva'>$iva";?>      % </strong></div></td>
      <td>
	  
	  
	  <? 
	  if ($exc1==1) $t1=0; if ($exc2==1) $t2=0; if ($exc3==1) $t3=0; if ($exc4==1) $t4=0; if ($exc5==1) $t5=0; if ($exc6==1) $t6=0;
	  if ($exc7==1) $t7=0; if ($exc8==1) $t8=0; if ($exc9==1) $t9=0; if ($exc10==1) $t10=0; if ($exc11==1) $t11=0; if ($exc12==1) $t12=0;
	  if ($exc13==1) $t13=0; if ($exc14==1) $t14=0; if ($exc15==1) $t15=0;
	  $subtotaliva= $t1 + $t2 + $t3 + $t4 + $t5 + $t6 + $t7 + $t8 + $t9 + $t10 + $t11 + $t12 + $t13 + $t14 + $t15;
	  $ivatotal= ($subtotaliva * $iva) / 100; 
	  $ivatotal1= round($ivatotal,2); echo "<input type=hidden name='ivatotal' value='$ivatotal1'>$ivatotal1";?>
Bs.
  <? if ($ivatotal<>"0") 
	  $cuenta16= "4.03.18.01.00"; echo "<input type=hidden name='cuenta16' value='$cuenta16'>$cuenta16";?>         
  <div align="center"></div></td>
    </tr>
    <tr>
      <td colspan="3"><div align="right"><strong>TOTAL</strong></div></td>
      <td><? $total= $ivatotal + $subtotal;
	  $total=round($total,2); echo "<input type=hidden name='total' value='$total'>$total";?>
Bs.         
  <div align="center"></div></td>
    </tr>
    <tr>
      <td><div align="center">Elaborado Por: </div></td>
      <td><div align="center">Aprobado Por: </div></td>
      <td colspan="2"><div align="center">Recibido Por: </div></td>
    </tr>
    <tr>
      <td><div align="center">
      <? echo "<input type=hidden name='adm' value='$adm'>$adm";?>      </div></td>
      <td><div align="center">
      <? echo "<input type=hidden name='jef' value='$jef'>$jef";?>      </div></td>
      <td colspan="2"><div align="center">
      <? echo "<input type=hidden name='rec' value='$rec'>$rec";?>      </div></td>
    </tr>
    <tr>
      <td><div align="center">Administradora de la Unidad </div></td>
      <td><div align="center">Jefe de la Unidad </div></td>
      <td colspan="2"><div align="center">Firma y Sello </div></td>
    </tr>
    <tr>
      <td colspan="4"><input name="Submit" type="submit" value="Guardar Orden de Compra">
&nbsp;&nbsp;&nbsp;&nbsp;<? echo "<input type=hidden name='sesion' value='$sesion'>";?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="index.php">Atras</a></td>
    </tr>
  </table>
</form>
<form action="modificar_compra2.php" method="post">
  <? echo "<input type=hidden name='sesion' value='$sesion'>";?>
  <input name="menu" type="submit" value="atras">
</form>
<p align="center" class="style1">&nbsp;</p>
</body>
</html>
